# Maintainer: Jelle van der Waa <jelle@vdwaa.nl>
# Contributor: Marcin (CTRL) Wieczorek <marcin@marcin.co>
# Contributor: Marcin Kornat <rarvolt+aur@gmail.com>
# Contributor: MatejSpindler <spindler.matej@gmail.com>

pkgname=esptool
pkgver=4.6.2
pkgrel=1
pkgdesc="A cute Python utility to communicate with the ROM bootloader in Espressif ESP8266"
arch=('any')
url="https://github.com/espressif/esptool"
license=('GPL2')
makedepends=('git' 'python-setuptools')
depends=('python-pyserial' 'python-ecdsa' 'python-bitstring' 'python-reedsolo' 'python-cryptography' 'python-pyyaml')
source=($pkgname-$pkgver.tar.gz::https://github.com/espressif/esptool/archive/v${pkgver}.tar.gz)
sha512sums=('97cc9f4d92b479351089fac59aed08f9519ff76d994ddae601da8e39b988f4bb90dc3885bf30b7998e2575a0365a5f0eef85f16a28b12eb944eec1e9f5265c6c')

build() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py build
}

package() {
  cd "${pkgname}-${pkgver}"
  python3 setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
